package com.wsc.dns.tests;

import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Iterator;

 

import com.wsc.crawler.DNS.AsyncDNSResolver;
import com.wsc.crawler.URLutils.URLBean;

public class AsyncDNSResolverTest {

	/**
	 * @param args
	 * @throws MalformedURLException 
	 */
	public static void main(String[] args) throws MalformedURLException {
 
		AsyncDNSResolver as = new AsyncDNSResolver();
		ArrayList <URLBean> list=new ArrayList<URLBean>();
		
	   /* ------------------------------Temp DataSource------------------------------------------------------
	    */
	      AsyncDNSResolverDataSource async = null;
		 
			async = new AsyncDNSResolverDataSource();
		//	System.out.println(async.getQueue());
			
	      as.setFullqueue(async.getQueue());
	      as.initializeThreads();
	   //   list=as.getResolvedURLBeans();
	      System.out.println(list.size());
	 //     list=as.getUnResolvedURLBeans();
	//      System.out.println(list.size());
	      Iterator<URLBean> itr=list.iterator();
	      
	      while(itr.hasNext())
	  //  	  System.out.println("next "+itr.next().getUnresolvedHost().toString());
	      list=null;
	    //  list=
	   
	    /* 
	    *  -----------------------------------------------------------------------------------
	    */
 
	}

}
